import Vue from 'vue'
import '@/api/index';
import '@/utils/axios';
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/style.scss'
import '@/assets/iconfont/iconfont.css';
import '@/components/notification';
import BTM from '@bitmain/components-tree'
Vue.use(BTM)

import App from './App.vue'
import router from './router'

Vue.use(ElementUI)

Vue.config.productionTip = false

const getToken = async () => {
  let res = await Vue.Geting(Vue.api.newGetToken, { appId: '1441', orgId: '1172', memberId: '28085' }); // 获取token
  let token = res.data.accessToken;
  Vue.prototype.$accessToken = token;  
}

(async () => {
  console.log(await getToken());
  new Vue({
    render: h => h(App),
    router
  }).$mount('#app')
})();

